﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace INSTA.BankApplication.Engine
{
    /// <summary>
    /// Strategy that withdraws the yearly fees
    /// on all account types.
    /// </summary>
    public class YearlyFeesStrategy : AccountStrategy
    {
        public override void Run(AccountBase target)
        {
            if (target is StandardAccount)
            {
                target.Withdraw(3);
            }
            else if (target is SilverAccount)
            {
                target.Withdraw(2);
            }
            else if (target is GoldAccount)
            {
                target.Withdraw(1);
            }
        }
    }
}
